package com.qf.service;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * Service层使用：小米商城 不写也行
 * SpringAOp底层：Cglib动态代理
 * @author lixu
 */
public class UserServiceImpl implements UserService {

    private FangDongService fangDongService;
    public void setFangDongService(FangDongService fangDongService) {
        System.out.println("2：UserServiceImpl:依赖注入");
        this.fangDongService = fangDongService;
    }

    public UserServiceImpl() {
        System.out.println("1：UserServiceImpl:构造器");
    }
    public void init(){
        System.out.println("4：UserServiceImpl:初始化");
    }



    public void taojihuanji(Integer i){
        if(i == 1){
            System.out.println("2：苹果20元一斤？");
        }else  if(i == 2){
            //
            System.out.println("4：这是北京，你做梦呢？");
        }else{
            System.out.println("6：当开张，就卖你了！");
        }
    }


    public void zufang(){//public void com.qf.service.UserServiceImpl.zufang(形参）


            //核心业务
            System.out.println("UserServiceImpl:3、签合同");
            int i = 1/0;
            System.out.println("UserServiceImpl:4、收房租");

    }


    public void daguasi(){

        System.out.println("123");
        System.out.println("456");
    }


}
